[platform] Add Support For Environment Variable File#5010
[platform] Add Support For Environment Variable File#5010tahmed-dev merged 4 commits intosonic-net:masterfrom
Conversation
5261f5f to
9b03c94
Compare
platform/broadcom/sonic-platform-modules-dell/s6000/scripts/s6000_platform.sh
Outdated
Show resolved
Hide resolved
pavel-shirshov
left a comment
There was a problem hiding this comment.
Can you please review some of my comments.
The changes are look good, I'd suggest to move all include operations to the first lines of the file. Like include first and than use the values here and there
|
there is a build failure, looks like related to your change. |
Looking into it this failure. |
This PR adds the ability to read environment file from /etc/sonic. the file contains immutable SONiC config attributes such as platform, hwsku, version, device_type. The aim is to minimize calls being made into sonic-cfggen during boot time. singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
1. move sonic-environment relocation from union-mount to rc.local 2. remove SONIC_HOSTNAME envvar
c68086d to
1ed0981
Compare
| PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`} | ||
| HWSKU=${HWSKU:-`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`} |
There was a problem hiding this comment.
Suggest using the same syntax for these variables. Either change former to 'DEVICE_METADATA["localhost"]["platform"]' or change latter to DEVICE_METADATA.localhost.hwsku
| PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`} | ||
| HWSKU=${HWSKU:-`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`} |
There was a problem hiding this comment.
Suggest using the same syntax for these variables. Either change former to 'DEVICE_METADATA["localhost"]["platform"]' or change latter to DEVICE_METADATA.localhost.hwsku
jleveque
left a comment
There was a problem hiding this comment.
I left two minor suggested syntactical changes for pre-existing code. In the interest of getting this merged and not waiting for a new cycle of check builds, I'm approving this PR; we can clean up the syntax in a future PR.
* [platform] Add Support For Environment Variable This PR adds the ability to read environment file from /etc/sonic. the file contains immutable SONiC config attributes such as platform, hwsku, version, device_type. The aim is to minimize calls being made into sonic-cfggen during boot time. singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
* [platform] Add Support For Environment Variable This PR adds the ability to read environment file from /etc/sonic. the file contains immutable SONiC config attributes such as platform, hwsku, version, device_type. The aim is to minimize calls being made into sonic-cfggen during boot time. singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
This PR adds the ability to read environment file from /etc/sonic.
the file contains immutable SONiC config attributes such as platform,
hwsku, version, device_type. The aim is to minimize calls being made
into sonic-cfggen during boot time.
singed-off-by: Tamer Ahmed tamer.ahmed@microsoft.com
- Why I did it
Added ability to read environment var file
- How I did it
New code that detect presence of such file during bootstrapping an image, the file is then moved to /etc/sonic
- How to verify it
This is infra work and image should boot normally in the absence of such file.
- Description for the changelog